// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

const cpn={
  template:`<div>{{message}}</div>`,
    data(){
    return{
      message:'老温'
    }
  }
}

/* eslint-disable no-new */
new Vue({
  el: '#app',
  // components: { App },
  // template: '<App/>'

  /* render函数即渲染函数，它的参数也是一个函数，即createElement*/
  render:function(createElement){
    // 1.普通用法：createElement('标签',{标签的属性},[标签的内容])
    // 会用createElement（‘’）括号里的东西来替换掉el挂载的div
   /* return createElement('h2',
      {class:'box'},
      ['你好，阿絮',createElement('button',['按钮'])])*/

  //  2.传入组件对象
  //   return createElement(cpn)

    return createElement(App)
  }
})